<?php
if( ! defined('BASEPATH')) exit('No direct script access allowed');

class Questions extends CI_Controller
{
	function __construct()
	{
		parent::__construct();
		// check if user logged in
		if(!$this->ion_auth->logged_in()){
			redirect('auth/login');	}
		$this->load->model('user/worksheet_model');
		$this->load->library('form_validation');
	}

	function index()
	{			
		$meta['page_title'] = "My Question";
		/*echo 'mopn'.$month_id;*/
		
		//if(isset($id)):
		$this->data['user_id'] = $id;
		$this->data['worksheet'] = $this->worksheet_model->get_worksheet($id,$year_id,$month_id);
		//else:
		//$this->data['worksheet'] = $this->worksheet_model->get_worksheet($year_id,$month_id);
		//endif;		
		$this->data['months'] = $this->worksheet_model->get_worksheet_months();		
		$this->load->view('common/header', $meta);
		$this->load->view('user/questions',$this->data);
		$this->load->view('common/footer');
	}
	
	
	

}

?>